<?php

namespace App\Common\Librarys;

use Hyperf\Snowflake\IdGeneratorInterface;
use Hyperf\Utils\ApplicationContext;

class GenerateSnowId
{
    /**
     * @return int
     */
    public function generate()
    {
        $container = ApplicationContext::getContainer();
        $generator = $container->get(IdGeneratorInterface::class);

        return $generator->generate();
    }
}